package com.aries.web.controller.system;

import cn.hutool.core.util.StrUtil;
import com.aries.common.config.AriesConfig;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 *
 * @author aries
 */
@Api(value = "首页控制器" , tags = {"首页管理管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
public class SysIndexController {
    /**
     * 系统基础配置
     */
    private final AriesConfig ariesConfig;

    /**
     * 访问首页，提示语
     */
    @RequestMapping("/")
    public String index() {
        return StrUtil.format("欢迎使用{}后台管理框架，当前版本：v{}，请通过前端地址访问。" , ariesConfig.getName(), ariesConfig.getVersion());
    }
}
